package com.mifengs.mall.ui.login;

import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.support.v4.content.ContextCompat;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.mifengs.commonbase.util.StatusBarCompat;
import com.mifengs.commonbase.util.StatusBarUtils;
import com.mifengs.mall.R;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class RegisterStepTwoActivity extends AppCompatActivity {

    @BindView(R.id.iv_welcome)
    ImageView mIvWelcome;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_register_step_two);
        ButterKnife.bind(this);
        StatusBarCompat.setStatusBarColor(this, ContextCompat.getColor(this, R.color.light_yellow_bg));
        StatusBarUtils.StatusBarLightMode(this);
        Glide.with(this).load(R.drawable.ic_register_success).asGif().diskCacheStrategy(DiskCacheStrategy.SOURCE).into(mIvWelcome);
    }

    @OnClick({R.id.rl_quit, R.id.tv_zz, R.id.tv_kefu,R.id.bt_complete_info})
    public void onViewClicked(View view) {
        Intent intent= null;
        switch (view.getId()) {
            case R.id.rl_quit:
                finish();
                break;
            case R.id.tv_zz:
                finish();
                break;
            case R.id.tv_kefu:
                intent = new Intent(Intent.ACTION_VIEW, Uri.parse("tel:400-9683889"));
                startActivity(intent);
                break;
            case R.id.bt_complete_info:
                intent = new Intent(RegisterStepTwoActivity.this, LoginActivity.class);
                startActivity(intent);
                finish();
                break;
        }
    }
}
